package com.yitiao.demo100;

/**
 * 用if语句实现a、b、c的值按从小到大排序
 */
public class question_04 {
    public static void main(String args[]){
        int a=9,b=5,c=7,t;
        if(a>b) {
//            t=a; a=b; b=t;
            a=a*b;
            b=a/b;
            a=a/b;
        }
        if(a>c) {
            t=a; a=c; c=t;
        }
        if(b>c) {
            t=b; b=c; c=t;
        }
        System.out.println("a="+a+",b="+b+",c="+c);
    }
}
